using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using BubzCommerce.CMS.Data.BusinessObjects;
using BubzCommerce.CMS.Data.Base;

namespace BubzCommerce.CMS.Data.ManagerObjects
{
    public partial interface ISitetreeLiveManager : IManagerBase<BubzCommerce.CMS.Data.BusinessObjects.SitetreeLive, int>
    {
		// Get Methods
		IList<SitetreeLive> GetByParentID(System.Int32 sitetreeLiveMember);
    }

    partial class SitetreeLiveManager : ManagerBase<BubzCommerce.CMS.Data.BusinessObjects.SitetreeLive, int>, ISitetreeLiveManager
    {
		#region Constructors
		
		public SitetreeLiveManager() : base()
        {
        }
        public SitetreeLiveManager(INHibernateSession session) : base(session)
        {
        }
		
		#endregion
		
        #region Get Methods

		
		public IList<SitetreeLive> GetByParentID(System.Int32 sitetreeLiveMember)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(SitetreeLive));
			
			
			ICriteria sitetreeLiveMemberCriteria = criteria.CreateCriteria("SitetreeLiveMember");
            sitetreeLiveMemberCriteria.Add(NHibernate.Criterion.Expression.Eq("Id", sitetreeLiveMember));
			
			return criteria.List<SitetreeLive>();
        }
		
		#endregion
    }
}